<!doctype html> 
<html ng-app='text'> 
<head> 
    <meta charset="utf-8"> 
    <title></title> 
    <script type="text/javascript" src='angular.js'></script>
    <script type="text/javascript" src='angular-route.js'></script>
    <script type="text/javascript">


    var app = angular.module('text',['ngRoute']);

    app.config(function ($routeProvider){
        //console.log($routeProvider)
        $routeProvider
        .when(
            '/me',
            {
                'templateUrl':'index.html',
                'controller':'const1'
            }
        )
        .when(
            '/yours',
            {
                'template':'<h2>今天真开心</h2>'
            }
        )
        .when(
            '/world',
            {
                'template':'<h2>世界真美好</h2>'
            }
        )
    });

    app.controller('const1',function ($scope){
        $scope.name ='leo';
        $scope.t = new Date().getTime();
    });

    /*
    app.controller('const',function ($scope,$route){
        console.log($route)
    })
    */

    </script>
</head>
<body>
	<a href="#/me">关于我</a>
    <a href="#/yours">关于你们</a>
    <a href="#/world">关于世界</a>
    <ng-view></ng-view>
</body>
</html>